python datetime add one week

40

import datetime

u = datetime.datetime.strptime("2011-01-01","%Y-%m-%d")
d = datetime.timedelta(days=7)
t = u + d

Comments

Submit
0 Comments